<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Cool Black
Description: A three-column, fixed-width blog design.
Version    : 1.0
Released   : 20090309

-->
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title><?php echo $this->pageTitle ?></title>
		<meta name="keywords" content="<?php echo Yii::app()->name ?>" />
		<meta name="description" content="<?php echo Yii::app()->name ?>" />
		<?php
		Yii::app()->clientScript->registerCoreScript('jquery');
		$requestBaseUrl = Yii::app()->request->baseUrl;
		$themeBaseUrl = Yii::app()->theme->baseUrl;
		$cs = Yii::app()->clientScript;

		// Skin
		// Automatic css versioning conflict with rewrite rule that add
		// index.php to all request. Need further research.
		// $timestamp = filemtime(dirname(__FILE__) . '/../../css/default.css');
		// $path = $themeBaseUrl . '/css/default.' . $timestamp . '.css';
		$path = $themeBaseUrl . '/css/style.1.css';
		$cs->registerCssFile($path, 'screen');
		$path = $themeBaseUrl . '/css/form.1.css';
		$cs->registerCssFile($path, 'screen');
		?>
	</head>

	<body>
		<div id="wrapper">

			<div id="header-wrapper">
				<div id="logo">
					<h1>Abip Management</h1>
				</div>
				<!-- end #logo -->
				<div id="header">
					<div id="menu">
						<?php
						$properties = array(
							'items'=>array(
								array('label'=>'Home', 'url'=>array('/site/index')),
								array('label'=>'Room', 'url'=>array('/room/index')),
								array('label'=>'Light', 'url'=>array('/light/index')),
								array('label'=>'HVAC', 'url'=>array('/hvac/index')),
								array('label'=>'Remote', 'url'=>array('/remote/index')),
								array('label'=>'Camera', 'url'=>array('/camera/index')),
								array('label'=>'Gate', 'url'=>array('/door/index')),
								array('label'=>'Mood', 'url'=>array('/mood/index')),
								array('label'=>'Download', 'url'=>array('/site/download')),
								array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
								//array('label'=>'Contact', 'url'=>array('/site/contact')),
								array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
								array('label'=>'Logout (' . Yii::app()->user->name . ')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
							),
						);
						$this->widget('zii.widgets.CMenu', $properties);
						?>
					</div>
					<!-- end #menu -->
				</div>
				<!-- end #header -->
			</div>
			<!-- end #header-wrapper -->

			<div id="page">
				<?php echo $content; ?>

				<div id="sidebar">
					<ul>
						<?php
						$properties = array(
							'title'=>'Operasi',
							'tagName'=>'li',
						);
						$this->beginWidget('zii.widgets.CPortlet', $properties);
						$widget = 'zii.widgets.CMenu';
						$properties = array(
							'items'=>$this->menu,
						);
						$this->widget($widget, $properties);
						$this->endWidget();
						?>
					</ul>
				</div>
				<!-- end #sidebar -->
				<div style="clear: both;">&nbsp;</div>
			</div>
			<!-- end #page -->

			<div id="footer">
			<p class="copyright">
				Design by
				<a href="http://www.freecsstemplates.org" target="_blank">Free CSS Templates</a>
				+
				<a href="http://p.yusukekamiyamane.com" target="_blank">Fugue Icon</a>
				&amp;
				Powered by
				<a href="http://www.yiiframework.com" target="_blank">Yii</a>
				&amp;
				<a href="http://www.jquery.com" target="_blank">jQuery</a>
			</p>
			</div>
			<!-- end #footer -->
		</div>
	</body>

</html>
